package nml.mail.reg.smtp;

import nml.mail.reg.Reg;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class netaddress_com extends Reg {
	// 要购买
	public void reg(String username, String password) {
		WebDriver dr = new ChromeDriver();

		String url = "https://classic.netaddress.com/tpl/Subscribe/Step1";
		dr.get(url);

		dr.findElement(By.name("usrUserId")).sendKeys(username);
		dr.findElement(By.name("newPasswd")).sendKeys(password);
		dr.findElement(By.name("RPasswd")).sendKeys(password);

		dr.findElement(By.name("usrFirst")).sendKeys("Tim");
		dr.findElement(By.name("usrLast")).sendKeys("Denken");

		dr.findElement(By.name("p_ButtonVal")).click();

		System.out.println(username + "@usa.net");
	}

	public static void main(String[] args) {
		new netaddress_com().reg("baiduchina", "qq3131798654");
	}

}
